package com.example.demo.model;

import lombok.Data;
import lombok.Getter;

@Data
public class PageRequest {
    @Getter
    private int currentPage=1;
    @Getter
    private int pageSize=10;

    public void setCurrentPage(int currentPage) {
        this.currentPage = currentPage;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int offset;
    public int getOffset(){
        return (currentPage-1)*pageSize;
    }
}
